#ifndef RECORDLIST_H
#define RECORDLIST_H
#include "record.h"
#include<vector>
#include<string>
#include<QMessageBox>
using namespace std;

class RecordList
{
private:
    friend class IncomeRecordList;
    friend class ExpenseRecordList;
    vector<Record>RCL;
public:
    RecordList();
    void addRecord(Record);
    void deleteRecord(Record);//recordID
    void modifyRecord(Record,Record);
    void clearList();
    void printList();
    int size();
    Record operator[](int);
    vector<Record> searchRecord(string input, string category, string field,
                                QDateTime fromTime, QDateTime toTime, double
                                fromPrice, double toPrice);
    vector<Record> getRecordList();
    virtual int categorysize() = 0;
    virtual QString getcategory(int) = 0;
    virtual vector<QString> getCategoryList() = 0;
    virtual void clearCategoryList() = 0;
    virtual void addCategory(QString) = 0;
    virtual void removeCategory(QString) = 0;
};

#endif // !RECORDLIST_H










